<%@ include file="/common/taglibs.jsp"%>

<probiz:pageHeading entityName="${skuOption.skuOptionName}" entityHeadingKey="skuOptionDetail.heading" />
<content tag="buttons">
<probiz:iconBtn btnType="save" onclick="return fnDoSave(this,'skuOptionName');" />
<c:if test="${skuOption.skuOptionId!=null}">
	<probiz:iconBtn btnType="delete" onclick="return fnDoDelete(this,'skuOptionName');" />
</c:if>
<probiz:iconBtn btnType="back" onclick="return fnDoCancelForm(this);" />
</content>
<probiz:showBindErrors bindPath="skuOption.*" />

<div class="top clearfix">
	<ul class="tab">
		<li class="curr"><span><fmt:message key="skuOptionDetail.heading"/></span></li>
	</ul>
</div>
<div class="modify">
	<form class="mainForm" method="post" action="${ctxPath}/product/skuOption.html" id="skuOptionForm" onsubmit="return validateAction();">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="com_modi_table">
			<input type="hidden" name="skuOptionId" id="skuOptionId" value="${skuOption.skuOptionId}" />
			<tr>
				<th colspan="2" class="title"><h4><fmt:message key="skuOptionDetail.group.basic"/><h4></th>
			</tr>
			<tr>
				<th class="label_width_1">
					<StoreAdmin:label key="skuOption.skuOptionName" />
				</th>
				<td>
					<input  name="skuOptionName" id="skuOptionName" value="${skuOption.skuOptionName}" style="width:150px" class="inputtxt"/>
				</td>
			</tr>
			
			<tr>
				<th>
					<StoreAdmin:label key="skuOption.memo" />
				</th>
				<td>
					<input type="text" name="memo" id="memo" value="${skuOption.memo}" style="width:250px" class="inputtxt"/>
					<probiz:plugin_tip id="memo_tip"><fmt:message key="skuOption.memo.tip" /></probiz:plugin_tip>
				</td>
			</tr>
			
			
			<table id="skuOptionValueTable" name="skuOptionValueTable" class="op_table" cellspacing="0" cellpadding="0" border="0" width="100%">
				<tr>
					<th style="width:20%"><fmt:message key="skuOptionValue.skuOptionValueName"/></th>
					<th style="width:30%"><fmt:message key="skuOptionValue.skuOptionValueType"/></th>
					<th style="width:20%"><fmt:message key="skuOptionValue.operation"/></th>
					<th><a href="javascript:void(0)" onclick="addSkuOptionValue('skuOptionValueTable')" class="none"><span class="add_sku"></span><fmt:message key="skuOptionDetail.addOptionValue"/></a></th>
				</tr>
			</table>
			
			
		</table>
		
	</form>
</div>

<c:set var="plugin_colorPicker" value="true" scope="request"/>
<c:set var="plugin_upload" value="true" scope="request" />
<script type="text/javascript" src="${ctxPath}/scripts/probiz/product/skuOptionForm.js?rs=${appConfig.rs}"></script>
<v:javascript formName="skuOption" staticJavascript="false" />
<script type="text/javascript">
$j(document).ready(function () {
	__FMTExtend = {
		skuOptionValue_skuOptionValueType_1:"<fmt:message key="skuOptionValue.skuOptionValueType_1"/>",
	    skuOptionValue_skuOptionValueType_2:"<fmt:message key="skuOptionValue.skuOptionValueType_2"/>",
	    skuOptionValue_skuOptionValueType_3:"<fmt:message key="skuOptionValue.skuOptionValueType_3"/>",
	    skuOptionValueDetail_delete_confirm:"<fmt:message key="skuOptionValueDetail.delete.confirm"/>",
	    skuOptionValueDetail_delete_false:"<fmt:message key="skuOptionValueDetail.delete.false"/>",
	    skuOptionDetail_imageUpload_tip:"<fmt:message key="skuOptionDetail.imageUpload.tip"/>"
	};
	$j.extend(__FMT, __FMTExtend); 
});
	
$j(document).ready(function () {
	<c:forEach items="${skuOption.skuOptionValues}" var="skuOptionValue">
		<common:javascriptEscape value="${skuOptionValue.skuOptionValueName}" returnValue="skuOptionValueName"/>
		<common:javascriptEscape value="${skuOptionValue.skuOptionValue}" returnValue="skuOptionValueValue"/>
		addSkuOptionValue("skuOptionValueTable",{id:${skuOptionValue.skuOptionValueId},name:"${skuOptionValueName}",type:"${skuOptionValue.skuOptionValueType}",value:"${skuOptionValueValue}"});
	</c:forEach>
});

</script>

